﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Helpers.Extensions
{
    public static class HtmlAgilityPackExt
    {
        /// <summary>
        /// 获取DocumentNode
        /// </summary>
        /// <param name="this"></param>
        /// <returns></returns>
        public static HtmlAgilityPack.HtmlNode GetDocumentNode(this string @this)
        {
            HtmlAgilityPack.HtmlDocument htmlDocument = new HtmlAgilityPack.HtmlDocument();
            htmlDocument.LoadHtml(@this);
            return htmlDocument.DocumentNode;
        }
    }
}
